package com.qyhl.webtv.module_broke.scoop.addscoop;


import com.qyhl.webtv.commonlib.entity.UpTokenBean;
import com.qyhl.webtv.commonlib.entity.intergral.CoinBean;

import java.io.File;
import java.util.List;

/**
 * Created by qyhl on 2017/12/11.
 */

public class ScoopAddPresenter implements ScoopAddContract.ScoopAddPresenter {
    private ScoopAddModel mModel;

    private ScoopAddContract.ScoopAddView mView;

    public ScoopAddPresenter(ScoopAddContract.ScoopAddView mView) {
        this.mView = mView;
        this.mModel = new ScoopAddModel(this);
    }

    @Override
    public void commit(String anonymous, String title, String content, String type, String author, String plateId, String creator, String creatorAvatar, String audioDuration, String phone, String address, List<String> list, int isprivate, String token, String prefix) {
        mModel.commit(anonymous, title, content, type, author, plateId, creator, creatorAvatar, audioDuration, phone, address, list, isprivate, token, prefix);
    }

    @Override
    public void commit(String anonymous, String title, String content, String type, String author, String plateId, String creator, String creatorAvatar, String audioDuration, String phone, String address, File file, String mVideoCoverPath, int isprivate, String token, String prefix) {
        mModel.commit(anonymous, title, content, type, author, plateId, creator, creatorAvatar, audioDuration, phone, address, file, mVideoCoverPath, isprivate, token, prefix);
    }

    @Override
    public void commitError(String msg) {
        mView.commitError(msg);
    }

    @Override
    public void commitSuccess(String msg) {
        mView.commitSuccess(msg);
    }

    @Override
    public void cancelCommit() {
        mView.cancelCommit();
    }

    @Override
    public void setProgress(float progress) {
        mView.setProgress(progress);
    }


    @Override
    public void getToken() {
        mModel.getToken();
    }

    @Override
    public void getTokenSuccess(UpTokenBean data) {
        mView.getTokenSuccess(data);
    }
}
